package com.zjy.pgcms.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 
 * @TableName service
 */
@TableName(value ="project")
@Data
public class Project implements Serializable {
    public Project(String category, String name, Double price, String description, String descriptionDetail) {
        this.userId = userId;
        this.category = category;
        this.name = name;
        this.price = price;
        this.description = description;
        this.descriptionDetail = descriptionDetail;
    }

    /**
     * 
     */
    @TableId(type = IdType.ASSIGN_ID)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    /**
     * 
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long userId;

    /**
     * 
     */
    private String category;

    /**
     * 
     */
    private String name;

    /**
     * 
     */
    private Double price;

    /**
     * 
     */
    private String description;

    /**
     * 
     */
    private String descriptionDetail;

    /**
     * 
     */
    private String headPictureUrl;

    /**
     * 
     */
    private String detailPictureUrl;

    /**
     * 
     */
    private Byte status;

    /**
     * 
     */
    private Date createTime;

    /**
     * 
     */
    private Date updateTime;

    /**
     *
     */
    @TableLogic
    private Byte deleteStatus;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    public Project(Long id, Long userId, String category, String name, Double price, String description, String descriptionDetail, String headPictureUrl, String detailPictureUrl, Byte status, Date createTime, Date updateTime, Byte deleteStatus) {
        this.id = id;
        this.userId = userId;
        this.category = category;
        this.name = name;
        this.price = price;
        this.description = description;
        this.descriptionDetail = descriptionDetail;
        this.headPictureUrl = headPictureUrl;
        this.detailPictureUrl = detailPictureUrl;
        this.status = status;
        this.createTime = createTime;
        this.updateTime = updateTime;
        this.deleteStatus = deleteStatus;
    }
}